package com.maxima.maximaAttendance.actions;

import org.apache.struts2.ServletActionContext;

import com.maxima.maximaAttendance.daos.ProjectDAO;
import com.maxima.maximaAttendance.pojos.Project;
import com.opensymphony.xwork2.ActionSupport;

public class ProjectActions extends ActionSupport{

	private static final long serialVersionUID = 1L;
	
	@Override
	public String execute() throws Exception {
		return SUCCESS;
	}
	public String add(){
		Project project= new ProjectDAO().add(new Project(ServletActionContext.getRequest().getParameter("projectName")));
		if(project!=null){
			return SUCCESS;
		}else{
			return ERROR;
		}
	}

}
